import React, { Component } from 'react';
import { View } from 'react-native';
import styles from './styles';
import CourseItem from './CourseItem';

class CourseList extends Component{
  render() {
    const { courseData, navigation } = this.props;
    return (
      <View
        style={styles.courseBoard}
      >
        {
          courseData.map((item, index) => {
            return (
              <CourseItem
                navigation={navigation}
                styles={styles}
                data={item}
                index={index}
                key={index}
              />
            );
          })
        }
      </View>
    );
  }
}

export default CourseList;